const mongoose=require('mongoose');

let accountSchema=new mongoose.Schema({
    item: {
        type:String,
        required:true
    },
    time: {
    type:Date,
    required:true
    },
    type: {
        type:Number,
        default:-1
    },
    price: {
        type:Number,
        required:true
    },
    remark: {
        type:String
    }
});
//创建模型对象  对文档操作的封装对象
let accountModel=mongoose.model('account',accountSchema);

module.exports=accountModel;



